﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MaintainAccount.aspx.cs" Inherits="Admin_MaintainAccount" %>
<%@ Register Src="~/Share/PersonDetails.ascx" TagName="ViewPerson" TagPrefix="uc1" %>




<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <%--<head runat="server">
    <title>GridView Data Manipulation</title>
    <script type="text/javascript" language="javascript">
        function ConfirmOnDelete(item) {
            if (confirm("The following item(s) will be deleted: " + item + "Continue?") == true)
                return true;
            else
                return false;
        }
    </script>
</head>--%>

<script type="text/javascript" language="javascript" src="../Scripts/gettime.js">
</script>

    
    <div class="cleaner"></div>
    <asp:LinkButton ID="lbtn_Student_Account" runat="server" 
        Text="Student's Account" onclick="lbtn_Student_Account_Click"></asp:LinkButton> |
    <asp:LinkButton ID="lbtn_Staff_Account" runat="server" Text="Staff's Account" 
        onclick="lbtn_Staff_Account_Click"></asp:LinkButton> |
    <asp:LinkButton ID="ltbn_Customer_Account" runat="server" 
        Text="Customer's Account" onclick="ltbn_Customer_Account_Click"></asp:LinkButton>
    <asp:Panel ID="pn_Admin_Content" runat="server">
    <!-- List of Account-->    
        <asp:Panel ID="pn_PersonDetails" runat="server">
        </asp:Panel>
        <br />
    <hr />
    <br />
    <div class="float_left">
        <asp:Button ID="btn_Insert" runat="server" Text="" onclick="btn_Insert_Click" />
        <asp:Button ID="btnUnBlock" runat="server" Text="UnBlock" 
            OnClientClick="javascript:return confirmAction();" onclick="btnUnBlock_Click" />
        <asp:Button ID="btn_BlockAccount" runat="server" Text="Block" OnClientClick="javascript:return confirmAction();" 
            onclick="btn_BlockAccount_Click" />
        <asp:Button ID="btn_Delele" runat="server" Text="Delete" OnClientClick="javascript:return confirmAction();" 
            onclick="btn_Delele_Click" />
        </div>
        <div class="search"> 
        <asp:Label ID="lb_Search" runat="server" Text=""></asp:Label>
            <asp:TextBox ID="txtSearch" runat="server" Width="131px"></asp:TextBox>
        Search by <asp:DropDownList ID="combx_Search" runat="server">
            <asp:ListItem>UserID</asp:ListItem>
            <asp:ListItem>Name</asp:ListItem>
        </asp:DropDownList><br />
        <span><asp:LinkButton ID="btn_Search" runat="server" Text="Go" 
            onclick="btn_Search_Click"></asp:LinkButton></span>
    </div>
        <div class="clear"></div>        
        <asp:Label ID="lb_list" runat="server" Text=""></asp:Label>         
    <asp:GridView ID="grv_Account" runat="server" AllowPaging="true" PageSize="8" Width="640px"
            AutoGenerateColumns="false" onrowdatabound="grv_Account_RowDataBound" 
            DataKeyNames="UserID" 
            onselectedindexchanged="grv_Account_SelectedIndexChanged1" 
            onpageindexchanging="grv_Account_PageIndexChanging" BorderColor="#293995">
        <Columns>
            <asp:TemplateField ItemStyle-Width="10px">                
                <HeaderTemplate><div>All 
                    <asp:CheckBox ID="chk_All" runat="server" AutoPostBack="true" OnCheckedChanged="onCheckedChange" />
                </HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID="chk_Item" runat="server" /> </ItemTemplate>
            </asp:TemplateField>
                             
            <asp:TemplateField ItemStyle-Width="50px" >                
                <HeaderTemplate><div> UserID </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="lb_UserID" runat="server" Text=' <%#Eval("UserID") %> '></asp:Label></ItemTemplate>
            </asp:TemplateField>

              <asp:TemplateField ItemStyle-Width="110px">
                <HeaderTemplate>Full Name</HeaderTemplate>
                <ItemTemplate> <%#Eval("FullName") %> </ItemTemplate>
            </asp:TemplateField>
            
             <asp:TemplateField  ItemStyle-Width="50px">
                <HeaderTemplate> Email </HeaderTemplate>
                <ItemTemplate> <%#Eval("Email") %> </ItemTemplate>
            </asp:TemplateField>

             <asp:TemplateField  ItemStyle-Width="65px">
                <HeaderTemplate> Date Join </HeaderTemplate>
                <ItemTemplate> <%#Eval("DateJoin") %> </ItemTemplate>
            </asp:TemplateField>

             <asp:TemplateField  ItemStyle-Width="80px">
                <HeaderTemplate> Course </HeaderTemplate>
                <ItemTemplate> <%#Eval("Course") %> </ItemTemplate>                
            </asp:TemplateField>

            <asp:TemplateField  ItemStyle-Width="120px">
                <HeaderTemplate> Subject (Type) </HeaderTemplate>
                <ItemTemplate> <%#Eval("Subject")%> (<asp:Label ID="lb_type" runat="server" Text=""></asp:Label>)</ItemTemplate>                
            </asp:TemplateField>

             <asp:TemplateField ItemStyle-Width="60px" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>                    
                <a href='MaintainAccount.aspx?UserID=<%#Eval("UserID") %>&&TypeofAccount=<%#Eval("Type") %>'>Details</a>
                </ItemTemplate>                
            </asp:TemplateField>            
          </Columns>        
    </asp:GridView>
    <asp:Label ID="lblResult" runat="server"></asp:Label>
    <!-- End list-->
    

    </asp:Panel>    
</asp:Content>

